package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the PARTIDA_RMC database table.
 * 
 */
@Embeddable
public class PartidaRmcPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;
	private long refnumPartNuevo;
	private long refnumPartAntiguo;

    public PartidaRmcPK() {
    }

	@Column(name="REFNUM_PART_NUEVO", unique=true, nullable=false)
	public long getRefnumPartNuevo() {
		return this.refnumPartNuevo;
	}
	public void setRefnumPartNuevo(long refnumPartNuevo) {
		this.refnumPartNuevo = refnumPartNuevo;
	}

	@Column(name="REFNUM_PART_ANTIGUO", unique=true, nullable=false)
	public long getRefnumPartAntiguo() {
		return this.refnumPartAntiguo;
	}
	public void setRefnumPartAntiguo(long refnumPartAntiguo) {
		this.refnumPartAntiguo = refnumPartAntiguo;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof PartidaRmcPK)) {
			return false;
		}
		PartidaRmcPK castOther = (PartidaRmcPK)other;
		return 
			(this.refnumPartNuevo == castOther.refnumPartNuevo)
			&& (this.refnumPartAntiguo == castOther.refnumPartAntiguo);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + ((int) (this.refnumPartNuevo ^ (this.refnumPartNuevo >>> 32)));
		hash = hash * prime + ((int) (this.refnumPartAntiguo ^ (this.refnumPartAntiguo >>> 32)));
		
		return hash;
    }
}